using FluentNHibernate.Mapping;
using Webshop20.Domain.Catalog.Core;

namespace Webshop20.Infrastructure.Persistence.NH.Mappings
{
    public class VisitorMapping : ClassMap<Visitor>
    {
        public VisitorMapping()
        {
            Id(visitor => visitor.Id);
            HasMany(v=>v.LastVisitedItems);
            WithTable("Customers", customer=> {
                Map(c => c.FirstName);
                Map(c => c.LastName);
                Map(c => c.EMail);
            });
        }
    }
}